﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebBanDT
{
    public partial class Admin1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["PhanQuyen"]=="admin")
            {
               switch (Request.QueryString["page"])
               {
                   case "user":
                       PlaceHolder1.Controls.Add(LoadControl("AdminControl/ThemSuaXoaUser.ascx"));
                       break;
                   case "SanXuat":
                       PlaceHolder1.Controls.Add(LoadControl("AdminControl/ThemSuaXoaSX.ascx"));
                       break;
                   case "SanPham":
                       PlaceHolder1.Controls.Add(LoadControl("AdminControl/ThemSuaXoaSP.ascx"));
                       break;
                   case "KieuDang":
                       PlaceHolder1.Controls.Add(LoadControl("AdminControl/ThemSuaXoaKieuDang.ascx"));
                       break;
               }
            }
            else
            {
                Response.Redirect("TrangChu.aspx"); 
            }
        }
    }
}